package com.ninemax.personel;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.DateUtil;

public class Test {

	public static void main(String[] args) throws ParseException {
		System.out.println("Hello  Desktop");
		HSSFWorkbook hssfWorkbook = new HSSFWorkbook();
		System.out.println(hssfWorkbook);
		Date fDate = new Date();
		String date = "2014-10-31 上午 08:55:01";
		String date2="2014-10-17 下午 06:06:54";
		String pattern = "yyyy-MM-dd a hh:mm:ss";
		SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
		String format = dateFormat.format(fDate);
		Date parse = dateFormat.parse(date);
	DateFormat instance2 = DateFormat.getInstance();
	
		Calendar instance = Calendar.getInstance();
		instance.setTime(parse);
		instance.add(Calendar.DAY_OF_MONTH, 1);
		Date time = instance.getTime();
		String format2 = dateFormat.format(time);
		System.out.println(format2);
		

	}
}
